1. Field of the Invention
The present invention relates to the field of data processing. More particularly, the invention relates to a data store for storing data and a method of allocating data to the data store.
2. Background to the Invention
A data processing apparatus may have a data store for storing data, such as a cache for example. It is reasonably common for a data store such as a cache to be organised in a “set-associative” manner, which means that a data value associated with a particular memory address can only be stored in a limited set of locations within the data store, with that set of location being selected based on the address of the data value. To keep track of which data values are stored in which locations, each data storage location typically has a corresponding tag storage location for storing a tag value indicating a portion of the address of the data value stored in the data storage location. When searching the data store for a data value identified by a target address, the data store searches all the possible tag locations corresponding to the set of data locations which could store the data value, and if one of these tag locations stores a tag value matching the target address, then the data value is accessed from this tag location. Since there is a one-to-one mapping between data entries in the data store and tag entries in the tag store, it is easy to locate the required data location once the corresponding tag has been found.
However, searching through the set of tag locations costs energy. The present technique seeks to provide a data store which is more energy efficient than a conventional data store.